$(function(){
	//T2--选择配色
	$(".t2 .motor .circle-list span").click(function(){
		var color = $(this).attr("class");
		var motorImg,bgImg;
		if (color=="circle-white"){
			motorImg = "/assets/images/product/T2_Phone/motor_white.png";
			bgImg = "/assets/images/product/T2_Phone/motor_white_bg.png";
		}else if(color=="circle-gray"){
			motorImg = "/assets/images/product/T2_Phone/motor_gray.png";
			bgImg = "/assets/images/product/T2_Phone/motor_gray_bg.png";
		}else if(color=="circle-green"){
			motorImg = "/assets/images/product/T2_Phone/motor_green.png";
			bgImg = "/assets/images/product/T2_Phone/motor_green_bg.png";
		}else if(color=="circle-blue"){
			motorImg = "/assets/images/product/T2_Phone/motor_blue.png";
			bgImg = "/assets/images/product/T2_Phone/motor_blue_bg.png";
		}
		$(".t2 .motor-img").attr("src",motorImg);
		$(".t2 .motor").css("background","url("+bgImg+")");
		//$(".t2 .motor-img").attr("src","/"+motorImg);
		//$(".t2 .motor").css("background","url(/"+bgImg+")");
	})
	//T3--选择配色
	$(".t3 .motor .circle-list span").click(function(){
		var color = $(this).attr("class");
		var motorImg,bgImg;
		if (color=="circle-white"){
			motorImg = "/assets/images/product/T3_Phone/motor_white.png";
			bgImg = "/assets/images/product/T3_Phone/motor_white_bg.png";
		}else if(color=="circle-gray"){
			motorImg = "/assets/images/product/T3_Phone/motor_gray.png";
			bgImg = "/assets/images/product/T3_Phone/motor_gray_bg.png";
		}else if(color=="circle-green"){
			motorImg = "/assets/images/product/T3_Phone/motor_green.png";
			bgImg = "/assets/images/product/T3_Phone/motor_green_bg.png";
		}else if(color=="circle-red"){
			motorImg = "/assets/images/product/T3_Phone/motor_red.png";
			bgImg = "/assets/images/product/T3_Phone/motor_red_bg.png";
		}
		$(".t3 .motor-img").attr("src",motorImg);
		$(".t3 .motor").css("background","url("+bgImg+")");
		//$(".t3 .motor-img").attr("src","/"+motorImg);
		//$(".t3 .motor").css("background","url(/"+bgImg+")");
	})
	
//	$(".motor-data .motor-con").mCustomScrollbar({
//		mouseWheel:false,
//	 	horizontalScroll:true,
//	});
	
});